<template>
	<view>
		<view class="" @tap="goPage('/pages/member/invoice/select')">
			<text v-if="invoice">[<text v-if="invoice.type==1">公司</text><text v-else>个人</text>]{{invoice.title}}</text>
			<text v-else class="text-gray">未选择发票</text>
		</view>
	</view>
</template>

<script>
	export default {
		props: {},
		created: function(e) {
			// let address_default = this.$common.getCache('address_default')
			// if(!address_default){
			// 	this.getDefaultAddress()
			// } else this.address = address_default
		},
		data() {
			return {
				invoice: null,
				CLOUDPATH: this.$config.cloudPath
			}
		},
		methods: {
			getInvoice() {
				return this.address
			},
			setInvoice(item) {
				this.invoice = item
			},
			editInvoice() {
				let id = this.invoice ? this.invoice.id : 0
				uni.navigateTo({
					url: "/pages/member/invoice/select?id=" + id
				})
			}
		},
	}
</script>

<style>
	.lefticon {
		min-width: 30rpx;
	}

	.orange-line {
		width: 100%;
		height: 6rpx;
	}
</style>
